package com.ruoyi.house.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.YjzFeedbackMapper;
import com.ruoyi.house.domain.YjzFeedback;
import com.ruoyi.house.service.IYjzFeedbackService;

/**
 * 意见反馈Service业务层处理
 *
 * @author 码道可道
 * @date 2025-07-14
 */
@Service
public class YjzFeedbackServiceImpl extends ServiceImpl<YjzFeedbackMapper, YjzFeedback> implements IYjzFeedbackService {
    @Autowired
    private YjzFeedbackMapper yjzFeedbackMapper;

    /**
     * 查询意见反馈
     *
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public YjzFeedback selectYjzFeedbackById(Long id) {
        return yjzFeedbackMapper.selectYjzFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     *
     * @param yjzFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<YjzFeedback> selectYjzFeedbackList(YjzFeedback yjzFeedback) {
        return yjzFeedbackMapper.selectYjzFeedbackList(yjzFeedback);
    }

    /**
     * 新增意见反馈
     *
     * @param yjzFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertYjzFeedback(YjzFeedback yjzFeedback) {
                yjzFeedback.setCreateTime(DateUtils.getNowDate());
            return yjzFeedbackMapper.insertYjzFeedback(yjzFeedback);
    }

    /**
     * 修改意见反馈
     *
     * @param yjzFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateYjzFeedback(YjzFeedback yjzFeedback) {
        return yjzFeedbackMapper.updateYjzFeedback(yjzFeedback);
    }

    /**
     * 批量删除意见反馈
     *
     * @param ids 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteYjzFeedbackByIds(Long[] ids) {
        return yjzFeedbackMapper.deleteYjzFeedbackByIds(ids);
    }

    /**
     * 删除意见反馈信息
     *
     * @param id 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteYjzFeedbackById(Long id) {
        return yjzFeedbackMapper.deleteYjzFeedbackById(id);
    }
}